/**
 * Diary App Styles - 日记应用样式
 * 清爽简洁的日记界面
 */

.cd-diary-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
}

/* 头部 */
.cd-diary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.cd-diary-title {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-diary-count {
  font-size: 14px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

/* 日记列表容器 */
.cd-diary-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* 空状态 */
.cd-diary-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #868e96;
  padding: 40px 20px;
}

.cd-diary-empty .cd-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.cd-diary-empty .cd-empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #495057;
}

.cd-diary-empty .cd-empty-subtitle {
  font-size: 14px;
  color: #868e96;
}

/* 日记条目 */
.cd-diary-item {
  background: white;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  overflow: hidden;
}

.cd-diary-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 日记条目头部 */
.cd-diary-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.cd-diary-item-header:hover {
  background: #f8f9fa;
}

.cd-diary-date {
  font-size: 16px;
  font-weight: 600;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-diary-toggle {
  font-size: 14px;
  color: #868e96;
  transition: transform 0.3s;
}

.cd-diary-item.cd-expanded .cd-diary-toggle {
  transform: rotate(0deg);
}

.cd-diary-item.cd-collapsed .cd-diary-toggle {
  transform: rotate(0deg);
}

/* 日记内容区域 */
.cd-diary-item-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.cd-diary-item-content.cd-show {
  max-height: 1000px;
  padding: 0 20px 20px 20px;
}

.cd-diary-item-content.cd-hide {
  max-height: 0;
  padding: 0 20px;
}

/* 日记文本内容 */
.cd-diary-content-text {
  font-size: 15px;
  line-height: 1.8;
  color: #495057;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #ff9a56;
}

/* 滚动条样式 */
.cd-diary-list::-webkit-scrollbar {
  width: 6px;
}

.cd-diary-list::-webkit-scrollbar-track {
  background: transparent;
}

.cd-diary-list::-webkit-scrollbar-thumb {
  background: #dee2e6;
  border-radius: 3px;
}

.cd-diary-list::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .cd-diary-header {
    padding: 12px 16px;
  }

  .cd-diary-title {
    font-size: 18px;
  }

  .cd-diary-list {
    padding: 12px;
  }

  .cd-diary-item-header {
    padding: 12px 16px;
  }

  .cd-diary-date {
    font-size: 15px;
  }

  .cd-diary-content-text {
    font-size: 14px;
    padding: 12px;
  }

  .cd-diary-item-content.cd-show {
    padding: 0 16px 16px 16px;
  }
}

/* 加载动画 */
@keyframes cd-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cd-diary-item {
  animation: cd-fadeIn 0.3s ease;
}

/* 展开/收起动画优化 */
.cd-diary-item.cd-expanded {
  margin-bottom: 16px;
}

.cd-diary-item.cd-collapsed {
  margin-bottom: 12px;
}

